|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.atlassian.jira.rpc.soap.service.IssueServiceImpl
public class IssueServiceImpl
| Field Summary | |
|---|---|
private ApplicationProperties |
applicationProperties
|
private PluginSoapAttachmentHelper |
attachmentHelper
|
private AttachmentManager |
attachmentManager
|
private AttachmentService |
attachmentService
|
private JiraAuthenticationContext |
authenticationContext
|
private CommentService |
commentService
|
private ConstantsManager |
constantsManager
|
private CustomFieldManager |
customFieldManager
|
static java.lang.String |
GENERIC_CONTENT_TYPE
|
private IssueCreationHelperBean |
issueCreationHelperBean
|
private IssueDeleteInterface |
issueDelete
|
private IssueFactory |
issueFactory
|
private IssueManager |
issueManager
|
private com.atlassian.jira.bc.issue.IssueService |
issueService
|
private IssueUpdater |
issueUpdater
|
private IssueUtilsBean |
issueUtilsBean
|
private JiraDurationUtils |
jiraDurationUtils
|
private LocaleUtils |
localeUtils
|
private static Logger |
log
|
private OutlookDateManager |
outlookDateManager
|
private PermissionManager |
permissionManager
|
private ProjectManager |
projectManager
|
private com.atlassian.jira.bc.projectroles.ProjectRoleService |
projectRoleService
|
private SoapUtilsBean |
soapUtilsBean
|
private WorklogService |
worklogService
|
| Constructor Summary | |
|---|---|
IssueServiceImpl(PermissionManager permissionManager,
ProjectManager projectManager,
IssueManager issueManager,
AttachmentManager attachmentManager,
CustomFieldManager customFieldManager,
IssueDeleteInterface issueDelete,
IssueCreationHelperBean issueCreationHelperBean,
OutlookDateManager outlookDateManager,
IssueUtilsBean issueUtilsBean,
JiraAuthenticationContext authenticationContext,
SoapUtilsBean soapUtilsBean,
ConstantsManager constantsManager,
LocaleUtils localeUtils,
ApplicationProperties applicationProperties,
IssueFactory issueFactory,
CommentService commentService,
com.atlassian.jira.bc.projectroles.ProjectRoleService projectRoleService,
IssueUpdater issueUpdater,
AttachmentService attachmentService,
WorklogService worklogService,
JiraDurationUtils jiraDurationUtils,
com.atlassian.jira.bc.issue.IssueService issueService)
|
|
| Method Summary | |
|---|---|
boolean |
addAttachmentsToIssue(User user,
java.lang.String issueKey,
java.lang.String[] fileNames,
byte[][] attachments)
|
private boolean |
addAttachmentToIssueFromMimeAttachments(User user,
java.lang.String[] fileNames,
GenericValue issueToAttach)
Attaches files using the method outlined in Fear of attachments at http://www.iseran.com/Steve/papers/fear-of-attachments.pdf and http://marc.theaimsgroup.com/?l=axis-user&m=109103923030924&w=2 |
void |
addComment(User user,
java.lang.String issueKey,
RemoteComment remoteComment)
|
RemoteWorklog |
addWorklogAndAutoAdjustRemainingEstimate(User user,
java.lang.String issueKey,
RemoteWorklog remoteWorklog)
|
RemoteWorklog |
addWorklogAndRetainRemainingEstimate(User user,
java.lang.String issueKey,
RemoteWorklog remoteWorklog)
|
RemoteWorklog |
addWorklogWithNewRemainingEstimate(User user,
java.lang.String issueKey,
RemoteWorklog remoteWorklog,
java.lang.String newRemainingEstimate)
A wrapper to call through to the com.atlassian.jira.bc.issue.worklog.WorklogService to validate and
create a new worklog entry |
private void |
checkAndThrowRemoteException(ErrorCollection errorCollection)
|
private void |
checkAndThrowValidationException(ErrorCollection errorCollection)
Throws a RemoteValidation if errorCollection is non empty. |
RemoteIssue |
createIssue(User user,
RemoteIssue rIssue)
|
RemoteIssue |
createIssueWithSecurityLevel(User user,
RemoteIssue rIssue,
java.lang.Long securityLevelId)
|
void |
deleteIssue(User user,
java.lang.String issueKey)
|
void |
deleteWorklogAndAutoAdjustRemainingEstimate(User user,
java.lang.String remoteWorklogId)
|
void |
deleteWorklogAndRetainRemainingEstimate(User user,
java.lang.String remoteWorklogId)
|
void |
deleteWorklogWithNewRemainingEstimate(User user,
java.lang.String remoteWorklogId,
java.lang.String newRemainingEstimate)
|
RemoteComment |
editComment(User user,
RemoteComment remoteComment)
|
(package private) java.lang.String |
formatTimeDuration(long timeSpentInSeconds)
Format up a time spend Long into a JIRA time duration pretty string. |
RemoteAttachment[] |
getAttachmentsFromIssue(User user,
java.lang.String issueKey)
|
RemoteNamedObject[] |
getAvailableActions(User user,
java.lang.String issueKey)
|
RemoteComment |
getComment(User user,
java.lang.Long commentId)
|
RemoteComment[] |
getComments(User user,
java.lang.String issueKey)
|
RemoteField[] |
getFieldsForAction(User user,
java.lang.String issueKey,
java.lang.String actionIdString)
|
RemoteField[] |
getFieldsForEdit(User user,
java.lang.String issueKey)
|
(package private) I18nHelper |
getI18nHelper()
|
RemoteIssue |
getIssue(User user,
java.lang.String issueKey)
|
RemoteIssue |
getIssueById(User user,
java.lang.String issueId)
|
(package private) Issue |
getIssueFromKey(java.lang.String issueKey)
Gets the issue. |
private java.util.Collection<java.lang.String> |
getProvidedFields(User user,
GenericValue project,
IssueInputParameters issueInputParameters)
|
java.util.Date |
getResolutionDateById(User user,
java.lang.Long issueId)
Returns the resolution date given an issue id |
java.util.Date |
getResolutionDateByKey(User user,
java.lang.String issueKey)
Returns the resolution date given an issue key |
RemoteSecurityLevel |
getSecurityLevel(User user,
java.lang.String issueKey)
Returns the current security level for given issue. |
private WorkflowTransitionUtil |
getWorkflowTransitionUtil(MutableIssue issue,
java.lang.String actionIdString)
|
RemoteWorklog[] |
getWorklogs(User user,
java.lang.String issueKey)
|
boolean |
hasPermissionToCreateWorklog(User user,
java.lang.String issueKey)
|
boolean |
hasPermissionToDeleteWorklog(User user,
java.lang.String worklogId)
|
boolean |
hasPermissionToEditComment(User user,
RemoteComment remoteComment)
|
boolean |
hasPermissionToUpdateWorklog(User user,
java.lang.String worklogId)
|
private IssueInputParameters |
makeIssueInputParameters(GenericValue project,
RemoteIssue rIssue,
User user,
java.lang.Long securityLevelId)
|
private RemoteIssue |
progressWorkflowAction(User user,
java.lang.String issueKey,
java.lang.String actionIdString,
java.util.Map actionParams)
|
RemoteIssue |
progressWorkflowAction(User user,
java.lang.String issueKey,
java.lang.String actionIdString,
RemoteFieldValue[] actionParams)
|
private MutableIssue |
retrieveIssue(java.lang.Long issueId,
User user)
Retrieve a single issue via it's database id, throwing an exception if the user has no permissions. |
private MutableIssue |
retrieveIssue(java.lang.String issueKey,
User user)
Retrieve a single issue via it's issue key, throwing an exception if the user has no permissions. |
(package private) User |
setRemoteUserInJira(User user)
|
RemoteIssue |
updateIssue(User user,
java.lang.String issueKey,
java.util.Map actionParams)
|
RemoteIssue |
updateIssue(User user,
java.lang.String issueKey,
RemoteFieldValue[] actionParams)
|
void |
updateWorklogAndAutoAdjustRemainingEstimate(User user,
RemoteWorklog remoteWorklog)
|
void |
updateWorklogAndRetainRemainingEstimate(User user,
RemoteWorklog remoteWorklog)
|
void |
updateWorklogWithNewRemainingEstimate(User user,
RemoteWorklog remoteWorklog,
java.lang.String newRemainingEstimate)
|
private GenericValue |
validateRpcOnlyFields(RemoteIssue rIssue,
User user)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private PermissionManager permissionManager
private ProjectManager projectManager
private IssueManager issueManager
private AttachmentManager attachmentManager
private LocaleUtils localeUtils
private ApplicationProperties applicationProperties
private final IssueFactory issueFactory
private final CommentService commentService
private final com.atlassian.jira.bc.projectroles.ProjectRoleService projectRoleService
private final IssueUpdater issueUpdater
private final AttachmentService attachmentService
private final JiraDurationUtils jiraDurationUtils
private final com.atlassian.jira.bc.issue.IssueService issueService
private CustomFieldManager customFieldManager
private PluginSoapAttachmentHelper attachmentHelper
private IssueDeleteInterface issueDelete
private final IssueCreationHelperBean issueCreationHelperBean
private final OutlookDateManager outlookDateManager
private final IssueUtilsBean issueUtilsBean
private final JiraAuthenticationContext authenticationContext
private final SoapUtilsBean soapUtilsBean
private final ConstantsManager constantsManager
private final WorklogService worklogService
private static final Logger log
public static final java.lang.String GENERIC_CONTENT_TYPE
| Constructor Detail |
|---|
public IssueServiceImpl(PermissionManager permissionManager,
ProjectManager projectManager,
IssueManager issueManager,
AttachmentManager attachmentManager,
CustomFieldManager customFieldManager,
IssueDeleteInterface issueDelete,
IssueCreationHelperBean issueCreationHelperBean,
OutlookDateManager outlookDateManager,
IssueUtilsBean issueUtilsBean,
JiraAuthenticationContext authenticationContext,
SoapUtilsBean soapUtilsBean,
ConstantsManager constantsManager,
LocaleUtils localeUtils,
ApplicationProperties applicationProperties,
IssueFactory issueFactory,
CommentService commentService,
com.atlassian.jira.bc.projectroles.ProjectRoleService projectRoleService,
IssueUpdater issueUpdater,
AttachmentService attachmentService,
WorklogService worklogService,
JiraDurationUtils jiraDurationUtils,
com.atlassian.jira.bc.issue.IssueService issueService)
| Method Detail |
|---|
public RemoteIssue getIssue(User user,
java.lang.String issueKey)
throws RemoteException,
RemotePermissionException
getIssue in interface IssueServiceRemoteException
RemotePermissionException
public RemoteIssue createIssue(User user,
RemoteIssue rIssue)
throws RemotePermissionException,
RemoteValidationException,
RemoteException
createIssue in interface IssueServiceRemotePermissionException
RemoteValidationException
RemoteException
public RemoteIssue createIssueWithSecurityLevel(User user,
RemoteIssue rIssue,
java.lang.Long securityLevelId)
throws RemotePermissionException,
RemoteValidationException,
RemoteException
createIssueWithSecurityLevel in interface IssueServiceRemotePermissionException
RemoteValidationException
RemoteException
private java.util.Collection<java.lang.String> getProvidedFields(User user,
GenericValue project,
IssueInputParameters issueInputParameters)
public RemoteIssue updateIssue(User user,
java.lang.String issueKey,
java.util.Map actionParams)
throws RemoteException
updateIssue in interface IssueServiceRemoteExceptionUser setRemoteUserInJira(User user)
public RemoteIssue updateIssue(User user,
java.lang.String issueKey,
RemoteFieldValue[] actionParams)
throws RemoteException
updateIssue in interface IssueServiceRemoteException
public RemoteField[] getFieldsForEdit(User user,
java.lang.String issueKey)
throws RemoteException
getFieldsForEdit in interface IssueServiceRemoteException
private GenericValue validateRpcOnlyFields(RemoteIssue rIssue,
User user)
throws RemotePermissionException,
RemoteValidationException
RemotePermissionException
RemoteValidationException
private IssueInputParameters makeIssueInputParameters(GenericValue project,
RemoteIssue rIssue,
User user,
java.lang.Long securityLevelId)
throws RemoteValidationException
RemoteValidationException
public void deleteIssue(User user,
java.lang.String issueKey)
throws RemoteException,
RemotePermissionException
deleteIssue in interface IssueServiceRemoteException
RemotePermissionException
public RemoteComment[] getComments(User user,
java.lang.String issueKey)
throws RemoteException,
RemotePermissionException
getComments in interface IssueServiceRemoteException
RemotePermissionException
public void addComment(User user,
java.lang.String issueKey,
RemoteComment remoteComment)
throws RemoteException,
RemotePermissionException
addComment in interface IssueServiceRemoteException
RemotePermissionException
public boolean hasPermissionToEditComment(User user,
RemoteComment remoteComment)
throws RemoteException
hasPermissionToEditComment in interface IssueServiceRemoteException
public RemoteComment editComment(User user,
RemoteComment remoteComment)
throws RemoteException
editComment in interface IssueServiceRemoteException
public RemoteComment getComment(User user,
java.lang.Long commentId)
throws RemoteException
getComment in interface IssueServiceRemoteException
private void checkAndThrowValidationException(ErrorCollection errorCollection)
throws RemoteValidationException
errorCollection - the ErrorCollection to check.
RemoteValidationException - if errorCollection is non empty.
private void checkAndThrowRemoteException(ErrorCollection errorCollection)
throws RemoteException
RemoteException
public RemoteNamedObject[] getAvailableActions(User user,
java.lang.String issueKey)
throws RemoteException
getAvailableActions in interface IssueServiceRemoteException
public RemoteField[] getFieldsForAction(User user,
java.lang.String issueKey,
java.lang.String actionIdString)
throws RemoteException
getFieldsForAction in interface IssueServiceRemoteException
public RemoteIssue progressWorkflowAction(User user,
java.lang.String issueKey,
java.lang.String actionIdString,
RemoteFieldValue[] actionParams)
throws RemoteException
progressWorkflowAction in interface IssueServiceRemoteException
public RemoteIssue getIssueById(User user,
java.lang.String issueId)
throws RemoteException,
RemotePermissionException
getIssueById in interface IssueServiceRemoteException
RemotePermissionException
private RemoteIssue progressWorkflowAction(User user,
java.lang.String issueKey,
java.lang.String actionIdString,
java.util.Map actionParams)
throws RemoteException
RemoteException
public boolean addAttachmentsToIssue(User user,
java.lang.String issueKey,
java.lang.String[] fileNames,
byte[][] attachments)
throws RemoteException
addAttachmentsToIssue in interface IssueServiceRemoteException
public RemoteAttachment[] getAttachmentsFromIssue(User user,
java.lang.String issueKey)
throws RemoteException
getAttachmentsFromIssue in interface IssueServiceRemoteException
private boolean addAttachmentToIssueFromMimeAttachments(User user,
java.lang.String[] fileNames,
GenericValue issueToAttach)
throws RemoteException,
RemotePermissionException
RemoteException
RemotePermissionException
private MutableIssue retrieveIssue(java.lang.String issueKey,
User user)
throws RemotePermissionException,
RemoteException
RemotePermissionException
RemoteException
private MutableIssue retrieveIssue(java.lang.Long issueId,
User user)
throws RemotePermissionException,
RemoteException
RemotePermissionException
RemoteExceptionI18nHelper getI18nHelper()
private WorkflowTransitionUtil getWorkflowTransitionUtil(MutableIssue issue,
java.lang.String actionIdString)
throws RemoteException
RemoteException
public RemoteWorklog addWorklogWithNewRemainingEstimate(User user,
java.lang.String issueKey,
RemoteWorklog remoteWorklog,
java.lang.String newRemainingEstimate)
throws RemoteException,
RemotePermissionException,
RemoteValidationException
com.atlassian.jira.bc.issue.worklog.WorklogService to validate and
create a new worklog entry
addWorklogWithNewRemainingEstimate in interface IssueServiceuser - the user in playissueKey - the key of the issue in playremoteWorklog - the remote worklog datanewRemainingEstimate - a new remaning extimate
RemoteException - if anything goes wrong in general
RemotePermissionException - if the user does not have permission to adda worklog
RemoteValidationException - if the data does not pass validation
public RemoteWorklog addWorklogAndAutoAdjustRemainingEstimate(User user,
java.lang.String issueKey,
RemoteWorklog remoteWorklog)
throws RemoteException,
RemotePermissionException,
RemoteValidationException
addWorklogAndAutoAdjustRemainingEstimate in interface IssueServiceRemoteException
RemotePermissionException
RemoteValidationException
public RemoteWorklog addWorklogAndRetainRemainingEstimate(User user,
java.lang.String issueKey,
RemoteWorklog remoteWorklog)
throws RemoteException,
RemotePermissionException,
RemoteValidationException
addWorklogAndRetainRemainingEstimate in interface IssueServiceRemoteException
RemotePermissionException
RemoteValidationException
public void deleteWorklogAndAutoAdjustRemainingEstimate(User user,
java.lang.String remoteWorklogId)
throws RemoteException,
RemotePermissionException,
RemoteValidationException
deleteWorklogAndAutoAdjustRemainingEstimate in interface IssueServiceRemoteException
RemotePermissionException
RemoteValidationException
public void deleteWorklogAndRetainRemainingEstimate(User user,
java.lang.String remoteWorklogId)
throws RemoteException,
RemotePermissionException,
RemoteValidationException
deleteWorklogAndRetainRemainingEstimate in interface IssueServiceRemoteException
RemotePermissionException
RemoteValidationException
public void deleteWorklogWithNewRemainingEstimate(User user,
java.lang.String remoteWorklogId,
java.lang.String newRemainingEstimate)
throws RemoteException,
RemotePermissionException,
RemoteValidationException
deleteWorklogWithNewRemainingEstimate in interface IssueServiceRemoteException
RemotePermissionException
RemoteValidationException
public void updateWorklogAndAutoAdjustRemainingEstimate(User user,
RemoteWorklog remoteWorklog)
throws RemoteException,
RemotePermissionException,
RemoteValidationException
updateWorklogAndAutoAdjustRemainingEstimate in interface IssueServiceRemoteException
RemotePermissionException
RemoteValidationException
public void updateWorklogAndRetainRemainingEstimate(User user,
RemoteWorklog remoteWorklog)
throws RemoteException,
RemotePermissionException,
RemoteValidationException
updateWorklogAndRetainRemainingEstimate in interface IssueServiceRemoteException
RemotePermissionException
RemoteValidationException
public void updateWorklogWithNewRemainingEstimate(User user,
RemoteWorklog remoteWorklog,
java.lang.String newRemainingEstimate)
throws RemoteException,
RemotePermissionException,
RemoteValidationException
updateWorklogWithNewRemainingEstimate in interface IssueServiceRemoteException
RemotePermissionException
RemoteValidationException
public RemoteWorklog[] getWorklogs(User user,
java.lang.String issueKey)
throws RemoteException,
RemotePermissionException,
RemoteValidationException
getWorklogs in interface IssueServiceRemoteException
RemotePermissionException
RemoteValidationException
public boolean hasPermissionToCreateWorklog(User user,
java.lang.String issueKey)
throws RemoteException,
RemoteValidationException
hasPermissionToCreateWorklog in interface IssueServiceRemoteException
RemoteValidationException
public boolean hasPermissionToDeleteWorklog(User user,
java.lang.String worklogId)
throws RemoteException,
RemoteValidationException
hasPermissionToDeleteWorklog in interface IssueServiceRemoteException
RemoteValidationException
public boolean hasPermissionToUpdateWorklog(User user,
java.lang.String worklogId)
throws RemoteException,
RemoteValidationException
hasPermissionToUpdateWorklog in interface IssueServiceRemoteException
RemoteValidationExceptionjava.lang.String formatTimeDuration(long timeSpentInSeconds)
timeSpentInSeconds - - the time spend in seconds as a Long
Issue getIssueFromKey(java.lang.String issueKey)
throws RemoteException
issueKey - the issue key.
RemoteException - if the issue doesn't exist.
public RemoteSecurityLevel getSecurityLevel(User user,
java.lang.String issueKey)
throws RemoteException,
RemotePermissionException
IssueService
getSecurityLevel in interface IssueServiceuser - user performing this operationissueKey - the issue key
RemoteException - If there was some problem preventing the operation from working.
RemotePermissionException - If the JIRA instance is not Enterprise edition, the issue key is invalid
or the user is not permitted to see this issue.
public java.util.Date getResolutionDateByKey(User user,
java.lang.String issueKey)
throws RemoteException
IssueService
getResolutionDateByKey in interface IssueServiceuser - The user making the requestissueKey - the key of the issue being retrieved
RemoteException - If the user doesn't have permission to browse the issue or the issue doesn't exist
public java.util.Date getResolutionDateById(User user,
java.lang.Long issueId)
throws RemoteException
IssueService
getResolutionDateById in interface IssueServiceuser - The user making the requestissueId - the id of the issue being retrieved
RemoteException - If the user doesn't have permission to browse the issue or the issue doesn't exist
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||